import { PropType, Recordable } from '@/global'
import { APIProps, TableProps } from './types/table'
import { ColumnProps } from './types/tableColumn'
import { PaginationProps } from './types/tablePagination'
export const basicProps = {
  tableProps: {
    type: Object as PropType<TableProps>,
    default: () => {
      return {
        border: true,
        highlightCurrentRow: true,
        tooltipEffect: 'dark'
      }
    }
  },
  columns: {
    type: [Array] as PropType<ColumnProps[]>,
    default: () => []
  },
  paginationProps: Object as PropType<PaginationProps>,
  showPagination: {
    type: Boolean as PropType<Boolean>,
    default: true
  },
  data: {
    type: [Array] as PropType<Recordable[]>,
    default: () => []
  },
  total: {
    type: Number as PropType<Number>,
    default: 0
  },
  rowKey: {
    type: String as PropType<String>,
    default: 'id'
  },
  APIProps: Object as PropType<APIProps>
}
